package com.max.sportmanage.mapper;

import com.max.sportmanage.entity.SysMenu;
import com.max.sportmanage.entity.SysPermission;
import com.max.sportmanage.entity.SysRole;
import com.max.sportmanage.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysUserMapper {
    /**
     * 查询所有用户信息
     * @return
     */
    List<SysUser> findAll();

    /**
     * 根据用户名查找用户
     * @param username
     * @return
     */
    SysUser findByUsername(String username);

    List<SysRole> findRoles(Long id);
    List<SysMenu> findMenus(Long id);
    List<SysMenu> findChildMenu(Long parentId,Long userId);
    List<SysPermission> findPermissions(Long id);
}
